* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.screen {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none;
}

#start-screen h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 游戏界面样式 */
#game-screen {
    padding: 20px;
    background: rgba(255,255,255,0.95);
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #2c3e50;
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.time-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.time-controls select {
    padding: 5px 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    font-size: 0.9rem;
    cursor: pointer;
}

.time-controls select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.time-display {
    font-size: 1.2rem;
    font-weight: bold;
}

.scene-name {
    font-size: 1.4rem;
    font-weight: bold;
}

.scene-select-btn {
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.scene-select-btn:hover {
    background: #c0392b;
}

/* 场景选择界面样式 */
#scene-select-screen {
    background: rgba(255,255,255,0.95);
    padding: 20px;
}

.scene-select-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scene-select-header h2 {
    color: #2c3e50;
}

.scenes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1200px;
}

.scene-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scene-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.scene-card h3 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.scene-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.sub-scenes {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 2px solid #ecf0f1;
}

.sub-scene-item {
    padding: 5px;
    margin: 3px 0;
    background: #f8f9fa;
    border-radius: 3px;
    cursor: pointer;
}

.sub-scene-item:hover {
    background: #e9ecef;
}

.game-main {
    display: flex;
    width: 100%;
    height: 60vh;
    gap: 20px;
}

.interaction-log {
    flex: 1;
    background: #ecf0f1;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
}

.interaction-log h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.log-content {
    font-size: 0.9rem;
    line-height: 1.4;
}

.scene-view {
    flex: 3;
    background: #bdc3c7;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-content: flex-start;
    overflow-y: auto;
}

.character-card {
    background: white;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 100px;
}

.character-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.character-card.farmer { border-left: 4px solid #27ae60; }
.character-card.miner { border-left: 4px solid #7f8c8d; }
.character-card.blacksmith { border-left: 4px solid #e74c3c; }
.character-card.cook { border-left: 4px solid #f39c12; }
.character-card.warrior { border-left: 4px solid #c0392b; }
.character-card.mayor { border-left: 4px solid #8e44ad; }

.game-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    gap: 20px;
}

.character-info {
    flex: 2;
    background: #ecf0f1;
    border-radius: 8px;
    padding: 15px;
    min-height: 150px;
}

.character-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.status-display {
    flex: 1;
    background: #ecf0f1;
    border-radius: 8px;
    padding: 15px;
}

.health-bar {
    margin-bottom: 10px;
    padding: 8px;
    background: #e74c3c;
    color: white;
    border-radius: 4px;
    text-align: center;
}

.needs-display div {
    margin: 5px 0;
    padding: 5px;
    background: #3498db;
    color: white;
    border-radius: 3px;
    text-align: center;
}

.log-entry {
    margin: 5px 0;
    padding: 5px;
    background: rgba(255,255,255,0.8);
    border-radius: 3px;
    border-left: 3px solid #3498db;
}